//
//  HRHearOfTopicCell.m
//  Hear
//
//  Created by mac on 2018/1/15.
//  Copyright © 2018年 mac. All rights reserved.
//

#import "HRHearOfTopicCell.h"
@interface HRHearOfTopicCell ()
@property (nonatomic,strong) UIView *backView;
@property(nonatomic, strong)UILabel *titleLabel;
@property(nonatomic, strong)UILabel *timeLabel;

@end
@implementation HRHearOfTopicCell

-(void)setModel:(HRGetSoundQuestionsModel *)model{
    self.titleLabel.text = model.QuestionText;
    self.timeLabel.text = model.ActiveText;
}

+(instancetype)cellWithTableView:(UITableView *)tableView
{
    static NSString *cellID = @"HRHearOfTopicCell";
    
    HRHearOfTopicCell *cell = [tableView dequeueReusableCellWithIdentifier:cellID];
    if(!cell){
        cell = [[HRHearOfTopicCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:cellID];
    }
    cell.selectionStyle = UITableViewCellSelectionStyleNone;
    return cell;
}
- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:UITableViewCellStyleDefault reuseIdentifier:reuseIdentifier];
    if (self)
    {
        self.backgroundColor = CustomColor(240, 240, 240, 1);
        
        self.backView = [[UIView alloc] initWithFrame:CGRectMake(25, 15, kScreenWidth-50, 55)];
        self.backView.backgroundColor = [UIColor whiteColor];
        [self addSubview:self.backView];
        self.backView.layer.cornerRadius = 8;
        self.backView.clipsToBounds = YES;
        
        self.titleLabel = [[UILabel alloc] initWithFrame:CGRectMake(10, 0, self.backView.width-20, self.backView.height)];
//        self.titleLabel.text = @"你们有没有碰到工作";
        self.textLabel.textColor = FirstTextColor;
        [self.backView addSubview:self.titleLabel];
//
//
//        UILabel *lineLabel = [UILabel new];
//        lineLabel.backgroundColor = CustomColor(240, 240, 240, 1);
//        [self.backView  addSubview:lineLabel];
//        lineLabel.frame = CGRectMake(20, self.titleLabel.bottom, kScreenWidth-20, 1);
//
//        self.timeLabel = [[UILabel alloc] initWithFrame:CGRectMake(self.titleLabel.left, lineLabel.bottom, self.titleLabel.width, self.titleLabel.height)];
////        self.timeLabel.text = @"10分钟前";
//        self.textLabel.textColor = FirstTextColor;
//        [self.backView addSubview:self.timeLabel];
        
        
    }
    return self;
}



- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
